<?php
namespace Home\Controller;
use Think\Controller;
use Think\Model;

/**
 * 构建一个专门用于平常Ajax请求响应json的测试API
 * 2015-06-15 ubuntuvimß
 */
class ResponseJsonDataController extends Controller {

    /**
     * 返回Extjs的ComboBox下拉框所需的测试数据
     */
    public function get_combobox_data(){
        $jsonStr = '[ {"value": "dengxiaoping", "text": "邓小平"}, {"value": "maozedong", "text": "毛泽东"}, {"value": "liushaoqi", "text": "刘少奇"}, {"value": "zhouenlai", "text": "周恩来"}, {"value": "linbiao", "text": "林彪"}]';
        echo $callback . "(" . $jsonStr . ")";
    }
 
}
